
<#include "/base/common/head.html"/>
    
 <style type="text/css">
 
.opeDoc{font-family: Arial, Helvetica, sans-serif; line-height: 20px; color: #2f8ec7;margin-left:10px;font-size:14px;}

</style>
   
    <table id="dg"></table>
    <div id="tb" style="padding:2px 5px;">
       
       <div style="text-align: left; margin:6px;">
            	<p class="opeDoc">操作说明：直接单击参数值进行编辑。</p>
       </div>
    </div>

<script type="text/javascript">

var datagrid = $("#dg"); //数据表格

var theValue = ""; //参数值。在编辑前记录，在编辑后比对，用于判断是否修改了参数值。

$(function() {
	datagrid.propertygrid({    
	    url: 'getSetData?system=${system!""}',    
	    showGroup: false,    //是否显示分组
	    fit:true,	
	    fitColumns: false,
    	striped:true,
    	toolbar:'#tb',
	    scrollbarSize: 0,
	    border:false,
	    onBeforeEdit:function(index, row, changes){ //编辑之前，记录下原始值
	    	theValue = row.value;
	    },
	    onAfterEdit:function(index, row, changes){ //编辑之后，如果值修改了，则提匀后台更更新
	    	if(theValue != row.value)
	    	{//值被修改
	    		var param = {
	    	       		"id": row.id, 
	    	       		"value": row.value
	    		};
	    		$.post("setOneData", param, function(data) {
	    			if("01" == data.code){//成功
	    				
	    			}else if("04" == data.code){//失败
	    				showErrorMsg(data.msg); //显示错误消息
	    			}
	    			
	    		});
	    	}
	    },
	    columns: [[
	                { field: 'code', title: '编号', width: 60, resizable: false, align:'center'},
	                { field: 'name', title: '参数名称', width: 300, resizable: false, align:'center'},
	                { field: 'value', title: '参数值', width: 200, resizable: false, align:'center' }
	        ]]
	
	}); 
	
});


</script>

<#include "/base/common/dialogWindow.html"/>
<#include "/base/common/foot.html"/>
